package org.elsfs.cloud.common.mybatis.ext.sql.support.condition;


import org.elsfs.cloud.common.util.lang.NamingCase;

/**
 * 为空条件

 */
public class IsNotNullConditionItem extends IsNullConditionItem {

    public IsNotNullConditionItem(String field) {
        super(field);
    }

    /**
     * 构建SQL片段
     *
     * @return SQL片段
     */
    @Override
    public String buildSqlFragment() {
        return String.format(
            "%s IS NOT NULL",
            NamingCase.toUnderlineCase(this.field)
        );
    }
}
